
#pragma once


namespace __OCF_PROXY__ 
{


using namespace __OCF_BASE__;

#define MAX_CHANNEL_INPUT	(10)
#define MAX_CHANNEL_NAME	(80)


#pragma pack(1)

typedef struct
{
	USHORT m_uiServerID;
	LONG m_lUsers;
	char m_achChannelName[MAX_CHANNEL_NAME];
}_CHANNEL_INFO_T;

#pragma pack()


#define __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__

template <class NC>
class CGwToLogin
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnKeyCheck__ = 1,

	};
	typedef NC _N_CLI_T;
public:
	CGwToLogin(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CGwToLogin()
	{
	}
	CGwToLogin& operator =(const CGwToLogin& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
	long fnKeyCheck(const ULONG ulBindX,const ULONG ulIdentity,const ULONG ulKey)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(1)).Push(ulBindX).Push(ulIdentity).Push(ulKey).IsValid()) return -1;

		return m_pcNc->SendAndRecv(cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr(), m_ulLenRcvBuff, m_pRcvBuff);
	}
	long fnKeyCheck_Return(BYTE & byRes)
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cTmpIn_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenRcvBuff, m_pRcvBuff);

		USHORT uiTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_;
		if (FALSE == cTmpIn_F74FAFA4_1595_44e4_A14C_6181269690D4_.Pop(uiTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_).Pop(byRes).IsValid()) return -1;
		return 0;
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class NC>
class CLoginToGw
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnKeyCheckReturn__ = 2,

	};
	typedef NC _N_CLI_T;
public:
	CLoginToGw(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CLoginToGw()
	{
	}
	CLoginToGw& operator =(const CLoginToGw& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
	long fnKeyCheckReturn(const ULONG ulBindX,const ULONG ulIdentity,const ULONG ulKey,const BYTE & byRes)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(2)).Push(ulBindX).Push(ulIdentity).Push(ulKey).Push(byRes).IsValid()) return -1;

		return m_pcNc->Send(cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
#define __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__

template <class NC>
class CGwToGame
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfo__ = 10,
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfoWithAsync__ = 11,

	};
	typedef NC _N_CLI_T;
public:
	CGwToGame(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CGwToGame()
	{
	}
	CGwToGame& operator =(const CGwToGame& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
	long fnFetchChannelInfo()
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(10)).IsValid()) return -1;

		return m_pcNc->SendAndRecv(cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr(), m_ulLenRcvBuff, m_pRcvBuff);
	}
	long fnFetchChannelInfo_Return(int & lLen,_CHANNEL_INFO_T * & pbyData)
	{
		CIn<_OCF_PROXYSTUB_TYPELIST_T> cTmpIn_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenRcvBuff, m_pRcvBuff);

		USHORT uiTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_;
		if (FALSE == cTmpIn_F74FAFA4_1595_44e4_A14C_6181269690D4_.Pop(uiTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_).Pop(lLen,(const _CHANNEL_INFO_T ** )(&pbyData)).IsValid()) return -1;
		return 0;
	}
	long fnFetchChannelInfoWithAsync()
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(11)).IsValid()) return -1;

		return m_pcNc->Send(cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__


template <class NC>
class CGameToGw
{
	typedef TYPE_LIST09(BYTE,BYTE*,ULONG,ULONG*,USHORT,_CHANNEL_INFO_T,_CHANNEL_INFO_T*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnFetchChannelInfoReturn__ = 12,

	};
	typedef NC _N_CLI_T;
public:
	CGameToGw(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
#endif
	}
	virtual ~CGameToGw()
	{
	}
	CGameToGw& operator =(const CGameToGw& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;
#endif

		return *this;
	}
	long fnFetchChannelInfoReturn(const int lLen,const BYTE * pbyData)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(12)).Push(lLen,pbyData).IsValid()) return -1;

		return m_pcNc->Send(cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline void SetProxyInfo_Return(ULONG ulLenRcvBuff, void* pRcvBuff) { m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline ULONG GetLengthRcvBuff() { return m_ulLenRcvBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
	inline void* GetRcvBuff() { return m_pRcvBuff; }
#else
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; }
	inline ULONG GetLengthSndBuff() { return m_ulLenSndBuff; }
	inline void* GetSndBuff() { return m_pSndBuff; }
#endif

private:
	ULONG m_ulLenSndBuff;
	void* m_pSndBuff;
#ifdef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
	ULONG m_ulLenRcvBuff;
	void* m_pRcvBuff;
#endif
	_N_CLI_T* m_pcNc;
};


#undef __SYNC_CALL_7C82602D_4E46_47a6_BFDD_AD8D42FA3FCD__
}
